from django.shortcuts import render

from secret_com.models import *


# from secret_com.templates import *

# Create your views here.


def department(request):
    depart = Department.objects.all()
    context = {'depart': depart}
    return render(request, 'department.html', context)


def staff(request):
    tag = request.GET.get('tag')
    my_staff = Department.objects.get(id=tag).peo_belong.all()
    context = {'staff': my_staff}
    return render(request, 'staff.html', context)


def chat_detail(request):
    chat = People.objects.get(id=request.GET.get('tag')).chat_belong.all()
    context = {'chat': chat}
    return render(request, 'chat_detail.html', context)

# def sec_index(request):
#     return render(request, 'department.html', {})
